<%--
  Created by IntelliJ IDEA.
  User: qiliping
  Date: 16/4/9
  Time: 下午8:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="paging" uri="paging-taglib" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
    <title>开放购买确认</title>
</head>
<body>
<div class="row">
    <div class="col-md-12">
        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
        <h3 class="page-title">
            基金管理
            <small>基金列表</small>
        </h3>
        <ul class="page-breadcrumb breadcrumb">
            <li>
                <i class="fa fa-home"></i>
                <a href="${ctx}/main">
                    首页
                </a>
                <i class="fa fa-angle-right"></i>
            </li>
            <li>
                <a href="${ctx}/product">
                    基金管理
                </a>
                <i class="fa fa-angle-right"></i>
            </li>
            <li>
                <a href="#">
                    开放购买
                </a>
            </li>
        </ul>
        <!-- END PAGE TITLE & BREADCRUMB-->
    </div>
</div>

<div class="main">

    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-primary">

                <div class="panel-body height410">
                    <div class="form-group">
                        <label class="control-label">基金名称：</label>
                        <span>${product.productName}</span>
                    </div>
                    <div class="form-group">
                        <label class="control-label">基金管理人：</label>
                        <span>${product.fundCompanyName }</span>
                    </div>
                    <div class="form-group">
                        <label class="control-label">基金经理 ：</label>
                        <span>${product.fundManagerName}</span>
                    </div>
                    <div class="form-group">
                        <label class="control-label">托管银行：</label>
                        <span>${product.fundCustodianName}</span>
                    </div>
                    <div class="form-group">
                        <label class="control-label">券商：</label>
                        <span>${product.fundTradingBroker}</span>
                    </div>
                    <div class="form-group">
                        <label class="control-label pull-left">总规模：</label>
                        <span style="margin-left: 75px;display: block;" class="trunk-fill4">
                            <fmt:formatNumber value="${product.productTotalScale}" pattern=",000"></fmt:formatNumber>万元
                        </span>
                    </div>
                    <div class="form-group">
                        <label class="control-label pull-left">成立时间：</label>
                        <span>
                            <fmt:formatDate value="${product.registerDate}" pattern="yyyy-MM-dd"/>

                        </span>
                    </div>
                    <div class="form-group">
                        <label class="control-label pull-left">已募集：</label>
                        <span>
                            <fmt:formatNumber value="${product.hasInvestAmount}" pattern=",000"></fmt:formatNumber>万元

                        </span>
                    </div>
                    <div class="form-group">
                        <label class="control-label pull-left">状态：</label>
                        <span>
                            <c:choose>
                                <c:when test="${product.productStatus == 3}">
                                    预约中
                                </c:when>
                                <c:when test="${product.productStatus == 4}">
                                    募集中
                                </c:when>
                                <c:when test="${product.productStatus == 8}">
                                    运行中
                                </c:when>
                                <c:when test="${product.productStatus == 9}">
                                    已结束
                                </c:when>
                            </c:choose>

                        </span>
                    </div>
                </div>
            </div>

        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <form:form method="post" class="form-horizontal">
                <input type="hidden" name="productId" value="${product.productId}"/>
                <table class="table table-striped table-hover zqy-table">
                    <thead>
                    <tr>
                        <th>ID</th>
                        <th>购买人</th>
                        <th>手机号</th>
                        <th>购买时间</th>
                        <th>状态</th>
                        <th></th>
                    </tr>
                    </thead>
                    <tbody>
                    <c:forEach var="item" items="${list}">
                        <tr>
                            <td>
                                <input type="checkbox" name="investmentId" value="${item.investmentId}"/>
                                    ${item.investmentId}</td>
                            <td>${item.userName}</td>
                            <td>${item.userPhone}</td>
                            <td>
                                <fmt:formatDate value="${item.investmentTime}" pattern="yyyy-MM-dd"/>
                            </td>


                            <td>
                                    <%--<c:choose>
                                        <c:when test="${item.status == 0}">
                                            待审核
                                        </c:when>
                                        <c:when test="${item.status == 1}">
                                            已通过
                                        </c:when>
                                        <c:when test="${item.status == 2}">
                                            已拒绝
                                        </c:when>
                                        <c:when test="${item.status == 3}">
                                            已取消
                                        </c:when>
                                    </c:choose>--%>

                            </td>
                            <td>

                            </td>
                        </tr>
                    </c:forEach>
                    </tbody>
                </table>
                <div class="form-group">
                    <div class="col-md-9 col-md-offset-3">
                        <button type="submit" class="btn blue">开放购买</button>
                        <span class="field-validation-error">${error}</span>
                    </div>
                </div>
            </form:form>
        </div>
    </div>
</div>
</body>
</html>
